package com.galeno.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author galeno
 * @Title:
 * @Description:
 * @date 日期2021/11/16时间20:30
 */
public class MatchUtils {
    public static int matchCount(String sequenceStr, String regex) {
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(sequenceStr);
        int count = 0;

        while (matcher.find()) {
            count++;
        }
        return count;


    }

}
